/* Ejercicio 4.17
   ejer4_17.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int client;
    int account, credit, balance, newcredit;

    for ( client = 1; client <= 3; client++ ) {
        printf( "Enter the customer's account: " );
        scanf( "%d", &account );
        printf( "Enter the customer's credit limit before the recession: " );
        scanf( "%d", &credit );
        printf( "Enter the customer's current balance: ");
        scanf( "%d", &balance );
        newcredit = credit / 2;
        printf( "The new credit of account #%d is: %d\n", account, newcredit );

        if ( balance > newcredit ) {
            printf( "The current balance exceed the new credit limit\n" );
        }
    }

	return 0;
} /* fin de la funcion main */
